//
//  Test6.cpp
//  CPPTest
//
//  Created by you5 Yi on 2021/9/3.
//

#include "Test6.hpp"
#include <iostream>

using namespace std;

class base {
public:
    virtual void print()
    {
        std::cout<<"in base"<<std::endl;
    }
};
class derived: public base {
public:
    void print() {
        std::cout<<"in derived"<<std::endl;
    }
};
void show(base *pb,void(base::*pf)())
{
    (pb->*pf)();
}
void test6() {
    //base b;
    //derived d;
    //show(&b, base::print);
    //show(&d, base::print);
}
